﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Ccit.SysOrgan;
using Ccit.OA.Utils;

namespace Ccit.Mgoa.Collaboration
{
    public partial class collaboration_pesonal_info : Ccit.Utils.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hdCommentId.Value = (Request.QueryString["id"] != null) ? Request.QueryString["id"].ToString() : "";
                InitPage();
            }
        }

        private void InitPage()
        {
            string sCommentId = hdCommentId.Value;
            if (sCommentId != "")
            {
                CollaborateBLL oCollaborate = new CollaborateBLL();
                MsCollaborativeTopic message = oCollaborate.GetCollaborativeTopicById(sCommentId);
                tdPulisher.InnerHtml = message.PublisherName;
                UserNET user = new UserNET(Convert.ToInt32(message.PublisherId));
                tdPublishOrg.InnerHtml = user.belong.OrganName + "/" + user.belong.DeptName;
                tdCreateDate.InnerHtml = message.CreateDate;
                tdCollaborativeType.InnerHtml = SysInterface.GetNameStrByIdStr("CLB_A3", "CLB_A3_10", "CLB_A3_20", message.TypeId, ",");
                tdPublishDate.InnerHtml = message.PublishDate;
                tdFinishDate.InnerHtml = message.FinishDate;
                tdTitle.InnerHtml = message.Title;
                string sContent = message.Content;
                tdDesc.InnerHtml = (sContent != "") ? sContent.Replace("\r\n", "<br/>") : "&nbsp;";
                attachComment.ViewShow("0040", sCommentId);
            }
        }
    }
}
